package ru.vsu.cs.pm.beans;

import ru.vsu.cs.pm.exceptions.IllegalAmountOfMoney;
import ru.vsu.cs.pm.models.DealerShip;
import ru.vsu.cs.pm.models.ItemType;
import ru.vsu.cs.pm.models.User;

import java.util.List;

/**
 * User: ohodyakov
 * Date: 04.01.2011
 * Time: 12:19:37
 */
public interface DealerShipManager {
    DealerShip getDealerShip(int dealerShipId);
    DealerShip saveOrUpdate(DealerShip dealerShip);
    void transferMoney(DealerShip dealerShip, User user) throws IllegalAmountOfMoney;
    void reserveMoney(DealerShip dealerShip, User user) throws IllegalAmountOfMoney;
    void addIncome(DealerShip dealerShip, User user);
    void addExpense(DealerShip dealerShip, User user);
    List<DealerShip> getMoneyTransfersForUser(User user, int start, int count);
    int getNumberOfUserMoneyTransfers(User user);
    List<DealerShip> getDealerShipsForUserByType(User user, List<ItemType> types, int start, int count);
    int getNumberOfDealerShipsForUserByType(User user, List<ItemType> types);
}
